[log] Add debug logging to mcp/tool_result.go#2061
Draft
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [aw] Debug Go Logger Enhancement workflow failure
[log] Add debug logging to mcp/tool_result.go
Mar 17, 2026
lpcox
added a commit
that referenced
this pull request
Mar 19, 2026
…sue (#2158) ## Summary Adds a **Guard Filtering Summary** section to the repo-assist Monthly Activity Issue so maintainers can see what objects the guard policy blocked during each run. ## What it looks like When the guard filters objects, the monthly activity issue will include: ```markdown ## Guard Filtering Summary | Type | Count | Resources | |------|-------|-----------| | Issues | 7 | #1711, #2049, #2086, #2087, #2089, #2093, #2100 | | PRs | 7 | #2037, #2042, #2061, #2063, #2064, #2092, #2096 | | Other | 2 | actions_list, get_repository_tree | **Policy**: `repos: [github/*], min-integrity: merged` **Total filtered**: 54 items across 17 tool calls ``` When no filtering occurs, it states "No objects were filtered by the guard policy." ## How it works 1. **New section in issue template** — "Guard Filtering Summary" sits between "Future Work" and "Run History" 2. **New step 6** — Agent reads `/tmp/gh-aw/mcp-logs/rpc-messages.jsonl` via bash, parses `DIFC_FILTERED` entries, groups by type (issues/PRs/other), deduplicates across tool calls 3. **Python one-liner** — Extracts resource descriptions, groups into a JSON summary the agent uses to populate the template ## Motivation From [run 23274488766](https://github.com/github/gh-aw-mcpg/actions/runs/23274488766), 54 objects were silently filtered with `min-integrity: merged`. The agent reported "GitHub API access to private repo issues unavailable" without understanding why. This change gives both the agent and maintainers explicit visibility into guard policy impact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Go Logger Enhancement" agentic workflow failed because the agent made valid changes to
internal/mcp/tool_result.gobut couldn't validate or commit them — bash commands likemake agent-finishedandgo build ./...were blocked by the workflow's strict tool allowlist, causing the job to exit without producing a patch.Changes
ConvertToCallToolResult— added entry log and success log (reportscontent_itemsandis_error)ParseToolArguments— added entry log (tool name) and success log (argument count); previously had zero logging callsUses the existing
logToolResult = logger.New("mcp:tool_result")logger; no new imports or declarations needed.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/tmp/go-build4231811108/b332/launcher.test /tmp/go-build4231811108/b332/launcher.test -test.testlogfile=/tmp/go-build4231811108/b332/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build4231811108/b270/vet.cfg ache/go/1.25.8/x64/src/runtime/c-c=4 _cgo_.o x_amd64/vet OUTPUT -d 168.63.129.16 x_amd64/vet --de�� 64/src/net --log-level x_amd64/vet --log-target journal-or-kmsg(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build4231811108/b317/config.test /tmp/go-build4231811108/b317/config.test -test.testlogfile=/tmp/go-build4231811108/b317/testlog.txt -test.paniconexit0 -test.timeout=10m0s --no�� 64/src/runtime/cgo(dns block)nonexistent.local/tmp/go-build4231811108/b332/launcher.test /tmp/go-build4231811108/b332/launcher.test -test.testlogfile=/tmp/go-build4231811108/b332/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build4231811108/b270/vet.cfg ache/go/1.25.8/x64/src/runtime/c-c=4 _cgo_.o x_amd64/vet OUTPUT -d 168.63.129.16 x_amd64/vet --de�� 64/src/net --log-level x_amd64/vet --log-target journal-or-kmsg(dns block)slow.example.com/tmp/go-build4231811108/b332/launcher.test /tmp/go-build4231811108/b332/launcher.test -test.testlogfile=/tmp/go-build4231811108/b332/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build4231811108/b270/vet.cfg ache/go/1.25.8/x64/src/runtime/c-c=4 _cgo_.o x_amd64/vet OUTPUT -d 168.63.129.16 x_amd64/vet --de�� 64/src/net --log-level x_amd64/vet --log-target journal-or-kmsg(dns block)this-host-does-not-exist-12345.com/tmp/go-build4231811108/b341/mcp.test /tmp/go-build4231811108/b341/mcp.test -test.testlogfile=/tmp/go-build4231811108/b341/testlog.txt -test.paniconexit0 -test.timeout=10m0s @v1.�� 64/src/net ache/go/1.25.8/x64/src/net/netip/netip.go x_amd64/compile -p crypto/internal//usr/bin/runc -lang=go1.25 x_amd64/compile -I /opt/hostedtoolcache/go/1.25.8/x64/src/runtime/c-p 4742298/b100/ x_amd64/vet -pthread -Wl,--no-gc-sectinspect -fmessage-length--format x_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.